<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<%@include file="/views/common/include/taglib.jsp"%>
<%@include file="/views/common/include/head.jsp"%>
<link rel="stylesheet" href="${ctx}/css/page/header2.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/reset.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/leftList.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/xqtz.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/bianming.css" type="text/css">
<%-- <link rel="stylesheet" href="${ctx}/css/page/shangchennav.css" type="text/css"> --%>
<link rel="stylesheet" href="${ctx}/css/page/page.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/footer.css" type="text/css">
   <script type="text/javascript">
	var ctx = '${ctx}';
</script>
</head>
<body>
    <jsp:include page="/views/common/head_main.jsp" />
	<div class="bg">
	<input type="hidden" id="item" value="${sessionScope.item_information}"/>
		<div class="contentbox contentbox1">
			<div class="padd1" style="padding: 20px 0 0 0;">
				<!-- 左选框 -->
				<div class="left-list">
					<ul>
						<li class="all"><a href="${ctx}/noticeInfo/noticeInfoList"><img style = "top: 19px;"class="font-icon" src="${ctx}/images/news/xq7.png">全部<span class="fuhao fh-color">∨</span></a></li>
						<li class="sub-list"><a href="${ctx}/noticeInfo/noticeInfoList">
							<img class="font-icon" src="${ctx}/images/news/xq9.png">小区通知 
							<c:if test="${unRead > 0}">
								<span class="note-box"><img class="note-bg" src="${ctx}/images/news/xq11.png">
									<span class="note-num">${unRead}</span>
								</span>
							</c:if>
							<span class="fuhao">＞</span></a></li>
						<li class="sub-list"><a href="${ctx}/cellManual/cellManualList"><img class="font-icon" src="${ctx}/images/news/xq9.png">社区政务<span class="fuhao">＞</span></a></li>
						<li class="sub-list"><a href="${ctx}/yellowPage/yellowPageList"><img class="font-icon" src="${ctx}/images/news/xq8.png">便民黄页<span class="fuhao">＞</span></a></li>	
					</ul>
				</div>
				<div class="rightbox">
					<div class="nav-search">
						<ul>
							<li><div class="blue-stick"></div></li>
							<li class="padd-li">便民黄页</li>
							<li ><input type="text" id="pageName" class="search-input" placeholder="请输入关键字" value="${(not empty pageName)? pageName : ''  }">
							<button class="search-btn" onclick="gotoPage()"><img src="${ctx}/images/news/yellowPage/bm3.png"></button></li>
						</ul>
					</div>
					<!-- 右列表 -->
					<div class="info-box">
						<table id="tab" class="table-style">
							<tr>
							<c:if test="${fn:length(yellowPages.list)-1 < 12 && fn:length(yellowPages.list) > 0}"> 
								<c:forEach begin="0" end="${fn:length(yellowPages.list)-1 }" var="i" >
								    <c:set var="item" value="${(yellowPages.list)[i]}"/>
								   		<td class="td-style"> 
											<div class="td-div">
												<div class="img-div"><img class="div-img" src="${ctx}/images/news/yellowPage/logo.png"></div>
												<div class="div-content">
													<div class="div-div">
														<p><em class="star">*</em>&nbsp;&nbsp;${item.pageName}</p>
														<p>
															<span><img src="${ctx}/images/news/yellowPage/phone.png"></span>
															<span>${item.phone0}</span>
														</p>
														<c:if test="${not empty(item.phone1)}">
															<p>
																<span><img src="${ctx}/images/news/yellowPage/phone.png"></span>
																<span>${item.phone1}</span>
															</p>
														</c:if>
														<p><em class="star">*</em>&nbsp;&nbsp;地址：${item.addr}</p>
													</div>
												</div>
											</div>
										</td>
								</c:forEach>
							</c:if>
							</tr>
						</table>
						<div class="page">
						<input id="pages" type="hidden" value="${yellowPages.pages}">
							<ul>
								<li><a class="last-page page-change " onclick="gotoPage(${currentPage-1 });">&lt;上一页</a></li>
								<c:if test="${yellowPages.firstPage > 1}">
									<li onclick="gotoPage(1);"
										class="page-num"><a>1</a></li>
									<c:if test="${yellowPages.firstPage > 2}">
		                       		...
		                       		</c:if>
								</c:if>
								<c:forEach items="${yellowPages.navigatepageNums }" var="page">
									<li onclick="gotoPage(${page });"
										class="<c:if test="${currentPage == page }">current</c:if>"
										class="page-num"><a>${page}</a></li>
								</c:forEach>
								<c:if test="${yellowPages.lastPage < yellowPages.pages}">
									<c:if test="${yellowPages.firstPage < yellowPages.pages - 1}">
		                       		...
		                       		</c:if>
									<li onclick="gotoPage(${yellowPages.pages});"
										class="page-num"><a>${yellowPages.pages}</a>
									</li>
								</c:if>
								<li><a class="next-page page-change" onclick="gotoPage(${currentPage+1 });">下一页&gt;</a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<jsp:include page="/views/common/footer.jsp" />
    <!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
    <script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
    <script src="${ctx}/js/controllers/news/yellowPageList.js" type="text/javascript"></script>
</body>
</html>